From: Richard M. Stallman Date: Sun, 30 May 1993 18:34:54 +0000 (+0000) Subject: (wait_for_termination): Add POSIX_SIGNALS alternative. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95759 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9ab714c7b06a04e38d5d26b3beef45f138365b40;p=emacs.git (wait_for_termination): Add POSIX_SIGNALS alternative. --- diff --git a/src/sysdep.c b/src/sysdep.c index c067ffa499c..167b9c398a9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -339,6 +339,15 @@ wait_for_termination (pid) break; wait (0); #else /* neither BSD nor UNIPLUS nor LINUX: random sysV */ +#ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ + sigblock (sigmask (SIGCHLD)); + if (0 > kill (pid, 0)) + { + sigunblock (sigmask (SIGCHLD)); + break; + } + sigpause (sigmask (SIGCHLD)); +#else /* not POSIX_SIGNALS */ #ifdef HAVE_SYSV_SIGPAUSE sighold (SIGCHLD); if (0 > kill (pid, 0)) @@ -355,6 +364,7 @@ wait_for_termination (pid) we lose just one second. */ sleep (1); #endif /* not HAVE_SYSV_SIGPAUSE */ +#endif /* not POSIX_SIGNALS */ #endif /* not UNIPLUS */ #endif /* not BSD, and not HPUX version >= 6 */ #endif /* not VMS */